import { defineConfig } from 'vitepress'

import { readFileSync } from 'fs';
import { resolve } from 'path';

const giteeSvgPath = resolve('src/icon/gitee.svg');
const gitee = readFileSync(giteeSvgPath, 'utf8');
// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: "Ameegle 学习笔记",
  description: "一个记录学习笔记的网站",
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    nav: [
      { text: '指南', link: '/' },
      { text: '示例', link: '/markdown-examples' }
    ],
    sidebar: [
      {
        text: '目录',
        items: [
          { text: 'docker', link: '/src/md/docker/options' },
          { text: 'linux', link: '/api-examples' }
        ]
      }
    ],
    socialLinks: [
      { icon: { svg: gitee }, link: 'https://github.com/vuejs/vitepress' }
    ],
    outline: {
      label: '页面导航',
    },
    footer: {
      message: '基于 MIT 许可发布',
      copyright: `版权所有 © 2019-${new Date().getFullYear()} Ameegle`
    }
  }
})
